﻿{% extends "2columns.html" %}

{% block jscript %}
<script>
$(document).ready(function() {
            $('table tbody td').bind("click", function() {
                window.location = $(this).children("b").html();
                return false;
            });
});
</script>
{% endblock %}

{% block leftcolumn %}		
        <div id="popular">
        <table id="randtable">
			<tbody>		
                <caption>Most popular:</caption>
                {% for dec in decs %}<tr><td>({{dec.popularity}}) <b>{{dec.uri}}</b></td></tr>
                {% endfor %}                					
			</tbody>		
		</table>
        </div>
{% endblock %}

{% block rightcolumn %}	
    <form action="/" method="post">
    <div id="title">Make Your own RandomizR</div>
    <div class="row"><label class="col1">question:&nbsp;&nbsp;</label>
    <span class="col2"><input name="question" class="input" type="text" id="question" size="60" tabindex="1" /></span>
    </div> 
    <div class="row"><label class="col1">www.random.iz.rs/</label>
    <span class="col2"><input name="uri" class="input" type="text" id="uri" size="20" tabindex="1" /></span>
    </div>     
    <div class="row"><label class="col1"><h3>Options:</h3></label>
    </div>  
    <input type="hidden" name="optnum" id="uri" value="4">
    <div class="row"><label class="col1">1:&nbsp;&nbsp;</label>
    <span class="col2"><input name="opt1" class="input" type="text" id="opt1" size="40" tabindex="2" /></span>
    </div>
    <div class="row"><label class="col1">2:&nbsp;&nbsp;</label>
    <span class="col2"><input name="opt2" class="input" type="text" id="opt2" size="40" tabindex="2" /></span>
    </div>    
    <div class="row"><label class="col1">3:&nbsp;&nbsp;</label>
    <span class="col2"><input name="opt3" class="input" type="text" id="opt3" size="40" tabindex="2" /></span>
    </div>   
    <div class="row"><label class="col1">4:&nbsp;&nbsp;</label>
    <span class="col2"><input name="opt4" class="input" type="text" id="opt4" size="40" tabindex="2" /></span>
    </div>    
    <div class="row">
    <input class="submit" type="submit" value="Create" />
    </div>
    </form>
{% endblock %}